Page({
    data:{
        fei:0,
        feiban:0,
        condition:false
    },
    switchchange(e){
        console.log(e);
        this.setData({
          condition:e.detail.value
        })
      },
    formsubmit(e){
        console.log(e)
        let bd = Number(e.detail.value.property)
        let fei = 0
        let feiban = 0
        if(bd<=10000){
            fei = 50
        }else if(bd<=100000){
            fei=0.025*bd-200;
        }else if(bd<=200000){
            fei=0.02*bd+300;
        }else if(bd<=500000){
            fei=0.015*bd+1300;
        }else if(bd<=1000000){
            fei=0.01*bd+3800;
        }else if(bd<=2000000){
            fei +=4800+bd*0.009
        }else if(bd<=5000000){
            fei=0.008*bd+6800;
        }else if(bd<=10000000){
            fei=0.007*bd+11800;
        }else if(bd<=20000000){
            fei=0.006*bd+21800;
        }else if(bd>20000000){
            fei=0.005*bd+41800;
        }

        if(this.data.condition){
            fei*=2;
          }
          
        feiban = fei/2
        fei = fei.toFixed(2)
        feiban= feiban.toFixed(2)

        this.setData({
            fei,feiban
        })
    }
})